package com.cndw.kungfu.vo;

import com.cndw.kungfu.domain.GoodsMode;
import com.cndw.kungfu.domain.SkillMode;
import com.cndw.kungfu.model.Context;
import com.cndw.kungfu.model.goods.PlayerBoxs;

/**
 * 技能的vo
 * @author fantadust
 * @date 2011-5-6 上午10:28:19
 */
public class SkillModeVO {
	/**
	 * 编号
	 */
	private int id;
	/**
	 * 职业id
	 */
	private int vocationId;
	/**
	 * 名称
	 */
	private String name;
	/**
	 * 副名称
	 */
	private String deputyName;
	/**
	 * 技能根id
	 */
	private int skillLibId;
	/**
	 * 技能类型
	 */
	private int type;
	/**
	 * 技能图片
	 */
	private String icon;
	/**
	 * 技能等级
	 */
	private int level;
	/**
	 * 玩家等级要求
	 */
	private int playerLevel;
	/**
	 * 前置技能id
	 */
	private int frontSkillId;
	/**
	 * 学习需要使用技能书
	 */
	private int studyBookId;
	private String studybookName;
	private String studyBookIcon;
	private int studyBookNum;
	/**
	 * 升级需要银两
	 */
	private int asset;
	/**
	 * 升级需要的金币
	 */
	private int gold;
	/**
	 * 升级需要的石头个数
	 */
	private int stoneNum;
	/**
	 * 升级需要的花费时间
	 */
	private int upgradeTime;	
	/**
	 * 描述
	 */
	private String description;
	/**
	 * 是否群攻
	 */
	private boolean groupType;
	/**
	 * 攻击个数
	 */
	private int groupNum;
	/**
	 * 是否仅在战斗中使用
	 */
	private boolean onlyBattleUse;
	/**
	 * 目标类型 1=>'敌方',2=>'友方'
	 */
	private int targetType;
	/**
	 * 伤害
	 */
	private int effectValue;
	
	/**
	 * 冷却时间 秒
	 */
	private int coolingTime;
	/**
	 * 消耗魔法量
	 */
	private int constMp;
	/**
	 * 吟唱时间 秒
	 */
	private int singingTime;
	/**
	 * 技能动作列表
	 */
	private String actionIds;
	/**
	 * 动作播放时间
	 */
	private int playTime;
	public SkillModeVO(){
		
	}
	public SkillModeVO(SkillMode skillMode){
		id = skillMode.getId();
		name = skillMode.getName();
		vocationId = skillMode.getVocationId();
		deputyName = skillMode.getDeputyName();
		skillLibId = skillMode.getSkillLibId();
		icon = skillMode.getIcon();
		level = skillMode.getLevel();
		playerLevel = skillMode.getPlayerLevel();
		frontSkillId = skillMode.getFrontSkillId();
		studyBookId = skillMode.getStudyBookId();
		asset = skillMode.getAsset();
		stoneNum = skillMode.getStoneNum();
		upgradeTime = skillMode.getCostTime();
		effectValue = skillMode.getEffectValue();
		description = skillMode.getDescription();
		onlyBattleUse = skillMode.isOnlyBattleUse();
		groupType = skillMode.isGroupType();
		groupNum = skillMode.getGroupNum();
		targetType = skillMode.getTargetType();
		gold = skillMode.getGold();
		
		coolingTime = skillMode.getCoolingTime();
		constMp = skillMode.getConstMp();
		singingTime = skillMode.getSingingTime();
		actionIds = skillMode.getActionIds();
		playTime = skillMode.getPlayTime();
		
	}
	/**
	 * 加載技能書的數據
	 * @param playerId
	 */
	public void initStudyBook(long playerId){
		if (studyBookId > 0) {
			GoodsMode goodsMode = Context.getGoodsServer().getModeById(studyBookId);
			if (goodsMode != null) {
				studybookName = goodsMode.getName();
				studyBookIcon = goodsMode.getIcon();
				PlayerBoxs playerBoxs = Context.getGoodsServer().getPlayerBoxs(playerId);
				studyBookNum = playerBoxs.getStackNum(studyBookId);
			}
		}
	}
	
	public int getId() {
		return id;
	}
	public void setId(int id) {
		this.id = id;
	}
	public int getVocationId() {
		return vocationId;
	}
	public void setVocationId(int vocationId) {
		this.vocationId = vocationId;
	}
	public String getName() {
		return name;
	}
	public void setName(String name) {
		this.name = name;
	}
	public String getDeputyName() {
		return deputyName;
	}
	public void setDeputyName(String deputyName) {
		this.deputyName = deputyName;
	}
	public int getSkillLibId() {
		return skillLibId;
	}
	public void setSkillLibId(int skillLibId) {
		this.skillLibId = skillLibId;
	}
	public int getType() {
		return type;
	}
	public void setType(int type) {
		this.type = type;
	}
	public String getIcon() {
		return icon;
	}
	public void setIcon(String icon) {
		this.icon = icon;
	}
	public int getLevel() {
		return level;
	}
	public void setLevel(int level) {
		this.level = level;
	}
	public int getPlayerLevel() {
		return playerLevel;
	}
	public void setPlayerLevel(int playerLevel) {
		this.playerLevel = playerLevel;
	}
	public int getFrontSkillId() {
		return frontSkillId;
	}
	public void setFrontSkillId(int frontSkillId) {
		this.frontSkillId = frontSkillId;
	}
	public int getStudyBookId() {
		return studyBookId;
	}
	public void setStudyBookId(int studyBookId) {
		this.studyBookId = studyBookId;
	}
	public int getAsset() {
		return asset;
	}
	public void setAsset(int asset) {
		this.asset = asset;
	}
	public String getDescription() {
		return description;
	}
	public void setDescription(String description) {
		this.description = description;
	}
	public boolean isGroupType() {
		return groupType;
	}
	public void setGroupType(boolean groupType) {
		this.groupType = groupType;
	}
	public boolean isOnlyBattleUse() {
		return onlyBattleUse;
	}
	public void setOnlyBattleUse(boolean onlyBattleUse) {
		this.onlyBattleUse = onlyBattleUse;
	}
	
	public int getTargetType() {
		return targetType;
	}
	public void setTargetType(int targetType) {
		this.targetType = targetType;
	}

	public int getEffectValue() {
		return effectValue;
	}
	public void setEffectValue(int effectValue) {
		this.effectValue = effectValue;
	}
	public int getCoolingTime() {
		return coolingTime;
	}
	public void setCoolingTime(int coolingTime) {
		this.coolingTime = coolingTime;
	}
	public int getConstMp() {
		return constMp;
	}
	public void setConstMp(int constMp) {
		this.constMp = constMp;
	}
	public int getSingingTime() {
		return singingTime;
	}
	public void setSingingTime(int singingTime) {
		this.singingTime = singingTime;
	}
	public String getActionIds() {
		return actionIds;
	}
	public void setActionIds(String actionIds) {
		this.actionIds = actionIds;
	}
	public int getStoneNum() {
		return stoneNum;
	}
	public int getUpgradeTime() {
		return upgradeTime;
	}
	public void setStoneNum(int stoneNum) {
		this.stoneNum = stoneNum;
	}
	public void setUpgradeTime(int upgradeTime) {
		this.upgradeTime = upgradeTime;
	}
	public String getStudybookName() {
		return studybookName;
	}
	public void setStudybookName(String studybookName) {
		this.studybookName = studybookName;
	}
	public String getStudyBookIcon() {
		return studyBookIcon;
	}
	public int getStudyBookNum() {
		return studyBookNum;
	}
	public void setStudyBookIcon(String studyBookIcon) {
		this.studyBookIcon = studyBookIcon;
	}
	public void setStudyBookNum(int studyBookNum) {
		this.studyBookNum = studyBookNum;
	}
	public int getPlayTime() {
		return playTime;
	}
	public void setPlayTime(int playTime) {
		this.playTime = playTime;
	}
	public int getGold() {
		return gold;
	}
	public void setGold(int gold) {
		this.gold = gold;
	}
	public int getGroupNum() {
		return groupNum;
	}
	public void setGroupNum(int groupNum) {
		this.groupNum = groupNum;
	}
	
	
		
	
}
